<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateClockinTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up(){
        Schema::create('clockin', function (Blueprint $table) {
            $table->integer('id',10)->comment('ID');
            $table->string('uid')->comment('用户ID');
            $table->string('department')->comment('部门ID');
            $table->string('status')->comment('签到状态 1：出勤，2：请假，3：外出，4：迟到 5：早退，6：旷工 ');
            $table->string('longitude',100)->comment('经度');
            $table->string('latitude',100)->comment('纬度');
            $table->string('type',4)->comment('签到设备 1：Phone，2：Pc，3：Pad');
            $table->string('ip',4)->comment('签到IP');
            $table->string('seg',5)->comment('班次 1：全天班，2：上午班，3：下午班，4：夜班，5：加班');
            $table->text('remarks')->comment('备注');
            $table->string('addtime',100)->comment('添加时间');
        });
        DB::statement("alter table `clockin` comment '签到表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down(){
        Schema::dropIfExists('clockin');
    }
}
